package gui;


import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.JPanel;
import javax.swing.JScrollPane;

import observer.RecordHolderObserver;

import seiboth.observables.IndexedObservable;
import skyproc.MajorRecord;
import skyproc.SPGlobal;

public class ModTreeTablePanel extends JPanel {
	
	private JTreeTable treeTable;

	/**
	 * 
	 */	
	private static final long serialVersionUID = 8984269434533635946L;

	public ModTreeTablePanel(TreeTableModel model) {
		super(new BorderLayout());
		
		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();


		treeTable = new JTreeTable(model);		

		JScrollPane scrollPane = new JScrollPane(treeTable);
		scrollPane.setPreferredSize( new Dimension( (int)(dim.getWidth()/3), (int)dim.getHeight()/3*2) );

		add(scrollPane, BorderLayout.CENTER);

		this.setOpaque(true);
	}
	
	public JTreeTable getTreeTable() {
		return treeTable;
	}

	public JPanel getPanel() {
		return this;
	}

}
